Method and apparatus for defining data of interest

ABSTRACT

Some embodiments of the invention include tools for extracting data of interest from the world wide web (WWW). The extraction is accomplished using descriptions of data of interest. The descriptions of data of interest can include computer programs comprising a sequence of instructions and extractor patterns. The extractor patterns can be developed interactively using a web browser integrated into the graphical development environment for creating the descriptions of data of interest. The instructions can be selected from a predetermined list of instructions designed for extracting information from the WWW. The descriptions of data of interest can be grouped into categories sharing common query elements.

This application is a continuation of application Ser. No. 12/550,987,filed on Aug. 31, 2009 (now pending), which is a continuation ofapplication Ser. No. 09/287,296, filed on Apr. 7, 1999 (U.S. Pat. No.7,584,120) issued Sep. 1, 2009, the contents of which are incorporatedherein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to the field of defining data of interest. Inparticular, the invention relates to techniques and tools for enablingnon-programmers to define data of interest.

2. Description of the Related Art

The development of the World Wide Web (WWW) has created an explosion inavailable information resources. However, it has also created a need forprograms, or tools, that enable users to locate information of interest.

Two primary types of tools are used to finding information on the WWW:search engines and catalogs. Search engines operate by using a robot, orcrawler, to request web pages and add the pages to an index. The searchengine receives a word or phrase input from a user and returns matchingpages from its index. One example of a search engine is Altavista,http://www.altavista.com/. Catalogs on the other hand are typicallymaintained by humans and are much smaller in scope. Like a librarycatalog, each web site is categorize, e.g. a toll-free directory mightbe categorized under Reference: Telephone Directories: 800 Directories,etc. One example of a catalog system is Yahoo!, http://www.yahoo.com/.

Neither type of system is designed to extract information from WWWsites. For example, if a user wants to find the closing price of a stockalong with other information about the stock, neither a search enginenor a web catalog is suitable for this task. Similarly, for comparisonprice shopping, search engines and web catalogs are unable to extractthe relevant information from web sites to offer these features.

Tools have been developed to support comparison price shopping on websites such as Jango, operated by Excite Corporation, Redwood City,Calif., at http://www.jango.com, and Junglee, operated by Amazon.com,Seattle, Wash., at http://shoptheweb.amazon.com/. Unlike search enginesand web catalogs, these products extract specific information fromparticular web sites based on a user request. These prior systems arelimited because they require sophisticated programming knowledge toenable the comparison shopping program to extract information from eachweb site. Further, these systems cannot easily be extended outside therealm of comparison shopping.

Accordingly, what is needed is a method for defining data of interestusable by non-programmers to enable the extraction of data of interestfrom web sites.

SUMMARY OF THE INVENTION

Some embodiments of the invention include tools for extracting data ofinterest from the World Wide Web (WWW). The extraction is accomplishedusing descriptions of data of interest. The descriptions of data ofinterest can include computer programs comprising a sequence ofinstructions and extractor patterns.

In some embodiments, a graphical user interface (GUI) program, or tool,is provided to create the descriptions of data of interest. In someembodiments, the GUI tool includes an integrated web browser thatsupports the development and testing of extractor patterns. The GUIprogram supports the use of the extractor patterns in the descriptionsof data of interest.

In some embodiments, the GUI program allows selection of instructionsfrom a predetermined list of instructions to construct the descriptionof data of interest. The predetermined list of instructions includesinstructions that can retrieve web pages using the hypertext transferprotocol (HTTP) in several fashions. Each instruction in the descriptionof data of interest creates one or more buffers that subsequentinstructions can manipulate. This allows a single instruction toretrieve several hundred linked pages based on information in thebuffer. Those retrieved pages each are retrieved into a separate bufferused by subsequent instructions.

The extractor patterns can include regular expressions. By allowing theregular expressions to be developed and tested directly within the webbrowser, non-programmers can easily develop descriptions of data ofinterest.

The descriptions of data of interest can be grouped into categoriessharing common extraction parameters. Multiple descriptions of data ofinterest in the same category can be executed simultaneously using thesame query.

A client computer using a web browser to initiate a query by causing anaccess of the descriptions of data of interest at a server.

In some embodiments, the descriptions of data of interest are used toprovide information about products available for sale over the WWW frommultiple sources. A selection of a product category from a predeterminedset of product categories can be made using information about theproduct. For example, for a Macintosh desktop computer product, the“Macintosh Desktop” category might be selected from a set of productcategories including “PC Desktops” “PC Notebooks”, “Handheld Computers”,“Macintosh Desktops”, and “Macintosh Notebooks”.

The extraction parameters, or inputs, for the category are thenaccessed. For example, the “Macintosh Desktops” category might have aninput that allows the processor type to be selected.

One or more of the extraction parameters can be selected for thedevelopment of descriptions of data of interest.

For each of the sources of the product, a corresponding description ofdata of interest, or program, is created. The program identifies acorresponding web site selling the product for the source. The GUI toolcan be used to create the corresponding program to extract the productinformation using the selected extraction parameters from the web site.

Once the descriptions are prepared, a connection from a client computercan be received. The value of the selected extraction parameters can besupplied with the connection. In some embodiments, the connection is anHTTP POST method including values for the selected extraction parametersresponsive to a completed hypertext markup language (HTML) form.

The values for the selected extraction parameters can be used to run allof the programs in the selected category to extract product informationfrom the corresponding web sites. The programs can be run in parallel orin series. The extracted information can be presented in a web pagetransmitted to the client computer.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates computers using one embodiment of the invention.

FIG. 2 is a process flow diagram for using descriptions of data ofinterest to extract information of interest from web sites.

FIG. 3 is a process flow diagram for creating a description of data ofinterest using a graphical user interface description creation program.

FIG. 4 is a process flow diagram for creating descriptions of data ofinterest.

FIG. 5 illustrates how information of interest in a hypertext markuplanguage document can be identified using extractor patterns andinstructions.

FIGS. 6-36 illustrate the development of a description of data ofinterest.

DETAILED DESCRIPTION A. System Overview

FIG. 1 illustrates computers using one embodiment of the invention. FIG.1 includes a computer that uses the data query and extraction computerand a computer used for creating descriptions of data of interest.

The following paragraph lists the elements of FIG. 1 and describes theirinterconnections. FIG. 1 includes a computer 100, a network 102, a website 104, a web site 106, a data query and extraction computer 108, anda computer 112. The data query and extraction computer 108 includesdescriptions of data of interest 110. The computer 112 includes agraphical user interface (GUI) description creation program 114. Thenetwork 102 is coupled in communication with the computer 100, the websites 104-106, the data query and extraction computer 108, and thecomputer 112. The GUI description creation program 114 is coupled incommunication with the descriptions of data of interest 110 eitherthrough the network 102, or through some other communications channel.

The following lists the uses of the elements of FIG. 1. The network 102is a network such as the Internet, an Intranet, an Extranet, or someother type of network. The network 102 supports communications betweenthe computers 100, 108 and 112 and the web sites 104-106 of FIG. 1. Inthis example, the network 102 is the Internet. The computer 100, the websites 104-106, the data query and extraction computer 108, and thecomputer 112 may be coupled to the network 102 by firewalls, or othertypes of access protection devices.

The data query and extraction computer 108 supports programs forreceiving requests from computers, such as the computer 100, to extractdata from web sites, such as the web sites 104-106. The data query andextraction computer 108 may be a single computer or multiple computers.The data query and extraction computer 108 may directly store thedescriptions of data of interest 110, or it may be coupled to anothercomputer storing the descriptions of data of interest 110. Typically,the data query and extraction computer 108 is comprised of one or moreUNIX server computers, Windows NT server computers, or some othercomputers. The data query and extraction computer 108 may operate ahypertext transfer protocol (HTTP) server, or web server, to receiverequests from clients (e.g., the computer 100). Alternatively, otherprotocols can be used to allow client computers to make extractionrequests.

The computer 100 is a computer such as a personal computer, athin-client computer, a set top box, a handheld computer, or some othertype of computer. The computer 100 can use a web browser such asNetscape Navigator, from Netscape Inc., Mountain View, Calif., to accessthe data query and extraction computer 108. Other web browsers andprograms can be used to access the data query and extraction computer108. If proprietary protocols are used to access the data query andextraction computer 108, software supporting those proprietary protocolsshould be available on the computer 100.

The computer 112 is a computer such as a personal computer, a servercomputer, or some other type of computer. The computer 112 can use thedata query and extraction computer 108 to extract data of interest fromweb sites in the same manner as described from the computer 100. Thecomputer 112 supports a GUI description creation program 114, or tool,that enables the development of additional descriptions of data ofinterest for inclusion in the descriptions of data of interest 110.Using the GUI description creation program 114, non-programmers canidentify and describe the data of interest on web sites such as the websites 104-106. Once a description of data of interest is created, it canbe made available in the descriptions of data of interest 110 for use byclients such as the computer 100.

The web sites 104-106 are collections of individual web pages that arelogically related to one another. For example, the web site 104 couldinclude the web pages of an online bookseller and the web site 106 couldinclude the web pages of an online stock information service. The websites 104-106 may be hosted by a single computer, multiple computers, orsupported through some other arrangement. In this example, each of theweb sites 104-106 is hosted by a single computer. Protocols other thanHTTP could be used to access the data of interest, e.g. file transferprotocol (FTP), simple mail transport protocol (SMTP), network newstransport protocol (NNTP), the information retrieval service definitionand protocol specification for library applications (ANSI/NISO Z.39-50standard), or some other protocol. For example, if the web site 104includes data of interest accessible through the FTP, the description ofthe data of interest can so indicate and the data query and extractioncomputer 108 can access that information.

B. Extracting Data

FIG. 2 is a process flow diagram for using descriptions of data ofinterest to extract information of interest from web sites. This methodcan be used by the computer 100 to request that information be extractedby the data query and extraction computer 108.

First, at step 200, the computer 100 accesses the data query andextraction computer 108 using a web browser and the URL of the dataquery and extraction computer 108.

Next, at step 202, the data query and extraction computer 108 willprovide a web page to the computer 100 that allows for the selection ofone or more descriptions of data of interest. In some embodiments, thedescriptions of data of interest will be hierarchically grouped intocategories. For example, if the data query and extraction computer 108supports comparison price shopping, the computer category might befurther sub-categorized into “Desktop PCs”, “Notebook PCs”. “MacintoshCompatible Systems”, etc. Similarly, if the data query and extractioncomputer 108 is an information retrieval service for stock data and newsreports, the stock category might have sub-categories for differentRectors: “Technology” “Durable Goods”, etc.

Within the “Macintosh Compatible Systems” sub-category, there would beone or more descriptions of data of interest. In this example, eachdescription of data of interest corresponds to at least one web sitewhere data is to be extracted. For example, the “Macintosh CompatibleSystems” sub-category might include a description of data of interestfor the Apple Store, a description of data of interest for a auctioncompany selling Macintosh compatible systems, and a description of datafor a computer store that sells Apple computers.

The web page presented to the computer 100 by the data query andextraction computer 108 may allow for explicit selection of whichdescriptions of data of interest will be used. In this embodiment, oncea category with descriptions of data of interest is selected, the useris prompted to select specific descriptions of data of interest to use.In some embodiments, the descriptions of data of interest are selectedautomatically once the category is selected. In this embodiment, all ofthe descriptions of data of interest in the selected category are used.In other embodiments, limits based on type of description can be used.For example in a comparison shopping service, there could be options tolimit the descriptions of data of interest used based on the type ofmerchant, e.g. retailer, auction site, or classified ads.

Next at step 204, values for the extraction parameters are provided bythe computer 100. Each category includes a set of extraction parameters.The sets of extraction parameters can be stored with the descriptions ofdata of interest 110, but could also be stored elsewhere. For example,the Macintosh compatible systems category might have extractionparameters for processor type, processor speed, manufacturer, and price.The computer 100 provides values for one or more of these parameters toinitiate a query and extraction operation. In some embodiments, the dataquery and extraction computer 108 generates a web page based on theextraction parameters in the category selected, the web page includes aform with inputs for receiving values for the extraction parameters.

Some extraction parameters have a fixed number of values, or a specifictype. For example, in searching for a Macintosh compatible system, theprocessor type extraction parameter might be limited to the followingvalues: “PowerPPC/603” “PowerPPC/604”, and “PowerPPC/G3”. In this case,instead of providing a text input field, a pop-up menu, or a group ofradio boxes can be displayed on the web page form sent to the computer100.

At step 208, the values of the extraction parameters are provided to thedata query and extraction computer 108. For example, the computer 100might specify the value of the processor type extraction parameter as“PowerPPC/G3”, and no other extraction parameter values. The data queryand extraction computer 108 uses the values of the extraction parametersin conjunction with the selected descriptions of data of interest 110 toextract data from the web sites 104-106.

The query and extraction of data from the web sites can occur inparallel or in sequence. For each of the sites, the correspondingdescription of data of interest is used to retrieve results from thecorresponding web site. For example, the description of data of interestX is for the merchant X operating the web site 104 and the descriptionof data of interest Y is for the merchant Y operating the web site 106.The two descriptions X and Y can be executed in parallel or in sequenceto extract the appropriate data from the web sites 104-106.

Lastly, at step 208, the extracted data of interest is collected andpresented on a web page. The web page is sent to the computer 100. Theresults web page can be presented incrementally as information isextracted from the web sites. If a protocol other than HTTP is beingused, the extracted data can be returned in other fashions. Theresulting page can include links that allow the extracted data to besorted by different outputs, e.g. price, warranty length, productavailability, etc.

C. Describing Data of Interest

1. Categories

FIG. 3 is a process flow diagram for creating a description of data ofinterest using the GUI description creation program 114. This processcould be used by the computer 112 to add to the descriptions of data ofinterest 110.

First, at step 300, the author identifies a web site that has data ofinterest. In a shopping comparison system, the data of interestcorresponds to a merchant, or seller, with a web site. In other uses,the web sites might correspond to information sources, e.g. a newsorganization web site. Typically, the web site is examined further atthis stage to determine whether it is desirable to develop a descriptionof data of interest for the web site.

At step 302, the author decides whether a particular type ofinformation, good, or service available at the web site, fits into anexisting category, or sub-category. For example, if the products arecomputer books, a decision can be made as to whether to include thisproduct in an existing category for books, or to create a new category,or sub-category, for computer books. If the product fits into anexisting category, the process continues at step 308. Otherwise, theprocess continues at step 304.

At step 304, the author specified the extraction parameters. e.g.inputs, for the new category. The exact inputs will vary based on thecategory. The extraction parameters are the types of attributes orcriteria that a user of the computer 100 can use to control theextraction of data of interest. For example, in the books category of acomparison shopping service, the extraction parameters might include thetitle and the author. Some extraction parameters may be common acrossmultiple categories. For example, if the data query and extractioncomputer 108 is providing comparison shopping services, then manycategories will offer minimum and maximum price extraction parameters.

At step 306, the author specifies the portions of data of interest. e.g.outputs. The exact outputs will vary based on the category. Some outputsmay be shared across multiple categories, e.g. price and availability ona comparison shopping service or recent headlines on an informationservice. For example, in the books category of a comparison shoppingservice, the outputs might include the title, the author, the publisher,the price, and whether the item is in stock. It is not necessary for allof the sites within a category to provide results in every field. Forexample, an auction site might not include the same type of detail aboutthe publisher of a book that a bookstore would. Thus, the inputs andoutputs represent the maximum amount of information that is provided orextracted, rather than required elements.

Finally, at step 308, a new description of data of interested is addedinside the selected category.

If a merchant sells multiple types of products, the process of steps302-308 will be repeated for each of type of product. For example, amerchant that sells books, music, and computer software, might needthree different descriptions of data of interest, one for each category.In many cases, the description of data of interest developed for onecategory can be used with slight modification in the other categories.

The categories and the information developed in steps 302-306 can bedeveloped using the graphical user interface (GUI) description creationprogram 1 14, or tool. The GUI description creation program 114 cansupport existing categories to add and/or remove inputs and outputs.

2. Descriptions

FIG. 4 is a process flow diagram for creating descriptions of data ofinterest. The process of FIG. 4 could be used at step 308 of FIG. 3 toadd a new description of data of interest inside a selected category.

At step 400, if all of the data of interest has been extracted, theprocess continues at step 414. Otherwise, the program for describing thedata of interest is developed starting at step 402.

At step 402, a portion of the data of interest is identified on the website using sample extraction parameters. The GUI description creationprogram 114 can support an integrated web browser. The integrated webbrowser enables the user to develop the data of interest interactivelyby creating extractor patterns.

In a search for books on a bookseller's web site, typically a searchfeature would be used. Thus, in this example, at step 402, the usercreates a sample search using sample extraction parameters to retrieve aresults page. The process continues at step 406, where the user selectsa first instruction from a predefined list of instructions. Theinstruction indicates that the program should retrieve the results pageusing extraction parameters. This can be done by using the GUIdescription creation program to extract the form into an instructionautomatically. The user can then assign extraction parameters to theform inputs. The process continues at step 408, where the results pageis stored for use in subsequent steps, then the process continues atstep 400, and since the data of interest has still not been extracted,the process continues at step 402.

This time, at step 402, the user can run the program created so far. TheGUI description creation program 114 will prompt the user to input atitle, and any other inputs assigned in the first instruction. Theresulting page will be a set of results. Again, the GUI descriptioncreation program 114 can be used to identify portions of data ofinterest on the page.

At step 404, extractor patterns are developed for a portion of data ofinterest. For example, if the results page includes the title, theauthor, and the price, three extractor patterns could be developed. Anextractor pattern can be developed by interactively selecting portionsof the web page, or web page source, in the browser view of the GUIdescription creation program 114.

In some embodiments, an extractor pattern is comprised of three regularexpressions, a pre-condition regular expression, a portion of data ofinterest regular expression, and a post-condition regular expression.For example, to match a title that always appears in bold just after alist element, the pre-condition regular expression would be the regularexpression “<LI><B>”. The portion of data of interest regular expressionwould be the regular expression “[̂<]*”. The post-condition regularexpression would be the regular expression “</B>”. Without thepre-condition and the post-condition, the portion of data of interestregular expression would match any sequence of characters before a “<”,the symbol used to indicate the start of an HTML tag. The pre-conditionand post-condition regular expressions narrow the match of the portionof data of interest regular expression to relevant matching strings.

Alternatively, a single regular expression can be used together with avalue indicating the portion of interest. For example, many regularexpression systems treat parentheses as creating an entity that can thenbe referred to subsequently. For example, the regular expression“<LI><B>([̂<]*)</B>” might be used to duplicate the effect of the threeregular expressions above. Most regular systems would treat the “[̂<]”portion within parenthesis as an entity that could be referred to as“\I” because it was inside the first set of parenthesis. The regularexpression could be associated with the value “1” to indicate that thefirst entity has the portion of data of interest.

The GUI description creation program 114 allows the extractor patternsto be developed on the source view of a web page. The matching portionto be displayed as rendered HTML code in a preview window. A control canswitch the contents of the preview window between showing the entirematching portion or just the portion of interest. Additionally, a numberof predefined regular expressions are available including ones formatching tables, hyperlinks, frames, prices, forms, and other patterns.

At step 406, an instruction is selected from a predefined list ofinstructions. The GUI description creation program 114 offers a set ofpredetermined instructions designed to extract data from web pageseasily. Table 1 includes a list of predefined instructions used in oneembodiment of the invention and the uses for each of the instructions.

TABLE 1 Instruction Uses Get, D-get, N-get, B-get, These eightinstructions are collectively post, D-post, N-post, referred to asget/post instructions. and B-post Get is used to retrieve a URL into thebuffer using the HTTP GET method. The D- and B-get instructions operateon the current buffer. An extractor pattern identifies URLs within thecurrent buffer, the D- and B-get instructions retrieve the web pagescorresponding to the matching URLs. For example, if the buffer has linksto search results, D-get can be used to retrieve all of the linked pagesfor further operations. The B-get instruction uses the HTML BASE tag inthe buffer to determine the absolute URL to retrieve. The N-getinstruction is used to retrieve pages from a variable storing data. Forexample, if in the first step of a program data is stored in a variable,a later step can use the N-get instruction to retrieve matching pagesusing the data stored in the variable. The D-, N-, and B-getinstructions produce multiple result buffers that subsequentinstructions in the program operate on separately. The post, D-post,N-post, and B-post instructions function like the corresponding getinstructions, but use the HTTP POST method to submit the URL andparameters to the remote web server. Value Value is used to make avariable the current buffer for subsequent operations. When looping isused to load multiple pages of results, the pages can be stored into avariable and then a value instruction can be used to make the variablethe buffer for subsequent operations. Dissect Dissect is used inconjunction with an extractor pattern to segment the current buffer intomultiple units, or new buffers. Each of the resulting units is a bufferthat subsequent instructions in the program operate on separately. SkipSkip is used when branching, pruning, or variable assignment sub-stepsare needed without a concurrent need to retrieve additional data fromthe web. Results Results is used as the last step of a program. Theinstruction is associated with sub-steps that store the data of interestin the outputs. All of the desired outputs will be associated withpatterns in the current buffer, or stored variables. Call Call is usedto execute another program. This allows descriptions of data of interestto be chained together.

In this example, the selected instruction is a results instruction.

Next, at step 408, the extractor pattern, or patterns, developed at step404 are used in conjunction with the selected instruction. Thistypically results in either the creation of additional buffers or theextraction of data. These additional buffers or extracted data can bestored. Alternatively, the extracted data can be associated with one ormore outputs. For example, if the extractor pattern developed at step404 is an extractor pattern for the title, a sub-step of the resultsinstruction could associate the title extractor pattern with the titleoutput.

At step 410, the instruction can be improved by adding optionalfeatures. For example, pruning can be used to remove portions of thebuffer that matched the pattern, but that do not correspond to data ofinterest. If the extraction parameter was a title, but the web searchalso found authors with that value, pruning can remove the portions thatdo not have the extraction parameter in the title area. Dissection canbe used to segment a web page into units using an extractor pattern forlater extraction from the units. Branching, or looping. can be used tocreate more sophisticated programs, for example, if a web site onlyreturns the first ten matches, looping can be used to retrieve all ofthe matches from the web site.

At step 412, the new instruction is sequenced among other instructions.Recall that the first instruction in the program created a buffer withthe results of a form submission for use by the step being developed toextract information. In this example, the title is the only outputsought. Therefore, the sequence of instructions will be the getinstruction that retrieves the search results followed by the resultsinstruction that extracts the title. The process then continues to step400.

At step 400, because all of the data of interest has been extracted,control continues to step 414.

At step 414, additional testing of the sequenced instructions can bedone. Once the script is adequately tested, it can be released by theGUI description creation program 114 for use by the data query andextraction computer 108 as description of data of interest 110.

D. Conceptual View of a Web Page

FIG. 5 illustrates how information of interest in a hypertext markuplanguage document can be identified using extractor patterns andinstructions.

The following paragraph lists the elements of FIG. 5. FIG. 5 includes aweb page 500. The web page 500 includes information that is not ofinterest 502, repeated information 504, units of information 506A-B, anda link to more information 508. The unit of information 506A includes afirst portion of data of interest 510 and a link to a second portion ofdata of interest 512.

The web page 500 includes information that is not of interest 502. Thismight include navigation links, advertising, descriptions, and othertypes of information. In developing extractor patterns, it is importantto test that they do not match the information that is not of interest502. One technique to reduce this probability is to use the dissectinstruction to divide the web page 500 into units of information 506A-B.

Each of the units of information 506A-B matches an extractor pattern.Typically, units share a common structure. Once a web page has beendissected into units, further program instructions operate on each ofthe units as an individual buffer. Many web sites include repeatedinformation 504, e.g. top choices. Dissecting the web page preventssubsequent extractor patterns from matching in the repeated information504.

Each of the units of information 506A-B will be operated on bysubsequent instructions in the description of data of interest. Thus,subsequent extractor patterns will only match on data within a unit. Theunit of information 500A includes a first portion of data of interest510 that is suitable for immediate extraction. The unit of information500A also includes a link to a second portion of data of interest 512. Aget/post instruction can be used to match the link 512 in the unit 506Aand retrieve the linked web page for extraction of the second portion ofdata of interest. The information extracted from the units 506A-B on theweb page 500 can then be combined with the information extracted by theD-Get. In this fashion, information from multiple depths of the web sitehierarchy can be combined.

The link to more information 508 can be detected with an extractorpattern. By building a loop, all of the information can be retrieved andstored for extraction across all of the data of interest.

Additionally, branches can be set up to detect error conditions. Onetype of error condition is that no records were found. For example,searching for a book titled “Where's Weldo” is unlikely to produce anyresults. by developing an extractor pattern for the case where there areno matching products at the web site, a branch in the program can becreated that stops the extraction of data from the site. This is a nomatching products result code.

Another type of error condition occurs if the web site modifies the wayresults are presented. Extractor patterns can be developed to test forthis circumstance and stop extraction of data from the site.Additionally, a branch can be created that stops the extraction of datafrom the site. This is a web site changed result code. In response tothis result code, the data query and extraction computer 108 cangenerate a message for the operator such as a log entry or an emailmessage about the web site change.

E. Developing a Description of Data of Interest FIGS. 6-36 illustratethe creation of a description of data of interest. In this example, aprogram to retrieve information about books for sale at an onlinebookstore will be developed.

1. Category Setup and Other Preliminaries

A web site of an online bookseller is selected,http://www.examplebookstorc.com/(FIG. 3, step 300). The web site isexamined by the user of the computer 112 to determine the suitability ofthe bookstore for inclusion in the descriptions of data of interest 110.For example, if the data query and extraction server specializes inproviding articles and comparison shopping for computers and computertechnologies, the Example Bookstore may be ill suited for inclusion ifthe book selection does not include many computer books and magazines.

In this example, the Example Bookstore is selected for inclusion in thedescriptions of data of interest 110. Next, it must be determined if theExample Bookstore's products fit into an existing category of productsor information.

FIG. 6 shows an example view of a hierarchical collection of categories.The list of categories is shown in the GUI description creation program114 using an outline style view 600. There is already a category for“Books, Music and Movies” 602. The category 602 has a sub-category forbooks 604. Inside the sub-category, there are already severaldescriptions of data of interest shown in list 606. Each descriptionincludes an entry in column 608 controlling whether or not thedescription is available to clients. e.g. the computer 100, using thedata query and extraction computer 108.

Because a suitable category for the Example Bookstore exists, it is notnecessary to go through steps 304-306. The process of developing a newdescription can begin at step 308.

FIG. 7 illustrates a category description for the books sub-category.The category name “Books” is shown 700. Then the inputs 702 and outputs704 are described. The inputs 702 correspond to the extractionparameters defined at step 304. The outputs 704 correspond to theportions of data of interest defined at step 306. In this embodiment,several inputs and outputs are defined that are not used by thedescriptions as indicated by the value in column 706.

FIG. 8 illustrates a blank description of data of interest. There arethree areas in the GUI description creation program 114 for defininginstructions. The instructions are listed in the area 802. Sub-steps ofthe instructions are listed in area 804. Branching and pruningoperations are listed in area 800. For each instruction in thedescription of data of interest, there will be one entry in area 802.For each instruction there will be one or more sub-steps visible in area804 when the corresponding instruction is being edited and defined.Similarly, there will be one or more branch and/or prune instructionsdisplayed in area 800 when an instruction is being edited and defined.

2. A Description of Data of Interest

At this point, no data has not been extracted (FIG. 4, step 400). Inthis example, the description of data of interest will only extract booktitles. Later in this example, the data extracted will be extended toinclude the popularity of the title.

FIG. 9 shows the home page of the Example Bookstore. The home page isbeing viewed using an integrated browser built into the GUI descriptioncreation program 114.

There are a number of tools in area 902 of the GUI description creationprogram 114 for developing extractor patterns.

In this example, the home page includes a search form 900 that allowsbooks to be located at the Example Bookstore. The tools in area 902include a control 904 for toggling between a view of the rendered HTMLand the HTML source, a control 906 for displaying a preview window ofthe matching HTML and other controls for testing extractor patterns. Thetools in area 902 also include an extractor pattern development area908. The extractor pattern development area 908 allows the pull-downselection of several predefined extractor patterns, as well as, theinteractive development of the extractor pattern. At this point, theuser of the computer 112 decides how to retrieve information on matchingtitles from the Example Bookstore. In this example, the search will bedone by using the form 900.

FIG. 10 shows an example of the types of predefined extractor patternsavailable for use in the extractor pattern development area 908. In FIG.10, the preview control 906 has been selected. A preview window 1000shows the matching extractor pattern as rendered HTML. The matchingextractor pattern is highlighted in the source view as indicated at1002. The integrated browser also includes a form control 1004. The formcontrol 1004 can automatically make an instruction in the description ofdata of interest corresponding to a form.

FIG. 11 shows the result when the user of the computer 112 signals onthe form control 1004. The instruction created by the form control 1004is the instruction 1100. The instruction 1 100 is a post instruction asindicated in the method pull-down list 1102. The list of predefinedinstructions is shown in Table 1. Each instruction takes one or morearguments and includes a value specifying the next step 1104 in thesequence of instructions.

As additional instructions are added, the values of the next step 1 104for the instructions can be changed to sequence the instructions. Thepost instruction 1100 has several sub-steps 1106. For the postinstruction, the sub-steps correspond to the different inputs of theform. Of the sub-steps, only sub-step 1110, the input named keywordquery on the form, is used to allow the title input to be used. Incolumn 1108, the other sub-steps are set to be static values. This meansthat those values will not be supplied by a user. Notice that the valuecolumn 1 112 allows predefined values extracted from the web page to beused for the static inputs. The name for sub-step 1110 can be changed tothat of one of the inputs 702 to create a correspondence between theinput and the keyword query field of the search form on the ExampleBookstores web site.

This change is shown in FIG. 12 where the name for the sub-step 1110 hasbeen changed to input title as shown at 1200. This associates theextraction parameter value given for the category input “InputTitle”with the “keyword-query” input of the Example Bookstore search form.

FIG. 13 shows the testing of the instruction 1100 with user input. Thewindow 1300 is displayed with the sub-steps of instruction 1100displayed and an input field 1302 where the user can provide a value forthe input title extraction parameter.

The result of executing the instruction is the web page shown in FIG.14. FIG. 14 shows the integrated browser window 1400 with the resultsfrom the input title value “Owen Meany”. The user can proceed to developthe description of data of interest further by extracting informationfrom the buffer generated by the post instruction, e.g. the contents ofthe web page shown in the integrated browser window 1400.

FIG. 15 shows the user developing an extractor pattern by firstidentifying a portion of the data of interest. Here the user has filledin a portion of one of the titles “A Prayer” at 1500 in the extractorpattern development area. Upon signaling on the match control 1501. theextractor pattern will be located in the web page. The pattern has beenfound and a longer string 1502 has been selected. The user will use thelonger string to generate an extractor pattern to match titles. The usersignals on the make extractor pattern control 1504 to refine theextractor pattern further.

FIG. 16 shows an extractor pattern development window 1600. Theextractor pattern development window 1600 includes a list of commonextractor patterns 1602 and an extractor pattern development pane 1604.In this embodiment, the extractor patterns are described bypre-condition, portion of data of interest, and post-condition regularexpressions. The pre-condition regular expression is surrounded by afirst set of parentheses, the matching condition by a second set ofparentheses, and the post-condition by a third set of parentheses. Theuser in FIG. 16 has developed a preliminary pre-condition regularexpression 1606, a preliminary portion of data of interest regularexpression 1608, and a preliminary post-condition regular expression1610. If this extractor pattern is tested, it will fail to match thesecond result entry of “A Prayer for Owen Meany” on the web site asshown in FIG. 14 because the link information is different inside theHREF attribute of the <A> tag for the second book. Further, theextractor pattern would fail to match books not titled “A Prayer forOwen .Meany” that still contained “Owen” and “Meany” in the title.

In FIG. 17, the extractor pattern is refined. Here many of the portionsof the extractor pattern that are unique to the current title have beenreplaced with regular expressions that will match other titles. Forexample, at 1700 the specific URL of the book has been replaced with awildcard that matches many similar URL's. Similarly, at 1702 thespecific title “A Prayer for Owen Meany” has been replaced with aregular expression that matches other titles.

FIG. 18 shows the refined extractor pattern being tested using the matchcontrol 1501 and the match again control 1802. The preview window 1804is shown so that the portion of data of interest of the extractorpattern shown as rendered HTML. Additionally, the matching HTML sourceis shown highlighted 1806. Now that the extractor pattern has beendeveloped, it can be used with an instruction to extract informationfrom the Example Bookstore web site.

FIG. 19 shows the new extractor pattern being added to an instruction. Anew result instruction 1902 has been added. The result instruction isone of the predetermined instructions. The result instruction is used toextract stored information from the buffer and variables into theoutputs defined in the category. When added to a description of data ofinterest, a dialog box 1906 is presented by default that allows thedefault outputs 704 for the category to be added as sub-steps to theresult instruction.

FIG. 20 shows the result of selecting “Yes” to the dialog box 1906, thecreation of sub-steps 2000. If not all of the outputs are being used, asin this example, then it may be desirable to select “No” in response tothe dialog box 1906 and simply add sub-steps for the used outputvariables. The sub-steps 2000 correspond to the outputs 704. Since onlythe title is being extracted, the source for the title is selected asextract from the pull-down list 2004. The extractor pattern that wasdeveloped is associated with that output in field 2006. The nextinstruction value for the instruction 1100 is changed to two so that theflow of the description of data interest is first to instruction 1 100and then to instruction 1902.

FIG. 21 shows the results of the program with the sample extractionparameter “Owen Meany” used. The result is the data of interest 2100.Each item in the data of interest 2100 has only one portion, the title.

FIG. 22 shows the same description of data of interest being tested withthe word “Dictionary” as the extraction parameter. The result is thedata of interest 2200, including an item of interest 2202, a dictionaryof British art with 20th century painters and sculptors.

3. Extracting Additional Portions of Data of Interest

Returning to FIG. 14, each of the search results from the ExampleBookstore includes information about the author, the year published andthe price, along with a link to other information. One of the otherpieces of information not present on the search results is how popular aparticular book is. To get that information, a user of the computer 100would normally have to signal on the links for each of the titles andlocate the sales rank. In extending the description of data of interest,a description that can retrieve the sales rank and combine it with thetitle information to present a list of titles and their sales popularitywill be developed.

FIG. 23 shows the development of an extractor pattern for the links thatlead to the sales rank information. The extraction pattern 2300 matchesonly the links on the results page that lead to further informationabout books.

In FIG. 24, a D-get instruction 2400 is added to the description of dataof interest. The D-get instruction accepts an extractor pattern wherethe portion of data of interest matched by the extractor pattern is aURL or relative URL.

FIG. 25 shows the results of the D-get instruction, a window 2500 ofmatching URLs and the corresponding absolute URLs deduced based on theweb site address.

Each of the web pages corresponding to a URL listed in the window 2500will be retrieved into a different buffer. Further execution of thedescription of data of interest will occur with each instructionoperating on all of the buffers.

FIG. 26 shows the web page linked to by one of the URLs and thedevelopment of an extractor pattern 2602 using the extractor patterndevelopment window 1600.

FIG. 27 shows the completed extractor pattern 2702 along with thepreview window 2704 showing a matching result for the extractor pattern2702.

FIG. 28 shows the sequencing of the D-get instruction 2800 to develop adescription of data of interest that retrieves the sales rank. In FIG.28, the extractor pattern 2702 is used as part of sub-step 2806 of theresult instruction 2802 to extract the sales information into an outputparameter for storing the sales rank. The sub-step 2804 of the resultinstruction 2802 assigns previously stored title information to thetitle output parameter as indicated by the selection of argument as thesource 2805 of the title information. Thus, the D-get instruction 2800should have a sub-step that extracts the titles from the bufferresulting from the post instruction 1100.

FIG. 29 shows the result when the new description is used with the titleextraction parameter of “Dictionary”. The result is the data of interest2900 including both the title and, where available, the sales rank forthat title.

4. Dissecting Web Pates

Sometimes web pages, such as the web page 500, include the repeatedinformation 504, such as top selections, or hot picks. The presence ofthe repeated information 504 can cause redundant extraction. It can alsocomplicate the development of extractor patterns. Further, sometimessimilar formatting is used in several places throughout a web pagemaking it difficult to extract the information of interest without firstprocessing the web page.

Sometimes, the information on a web page is comprised of units. A unitis a logically similar portion of an HTML document. For example, FIG. 14has two units, one for each book and the units all have similarinformation about the book: title, author, price, year published, and alink to more information. Similarly, the results page for the value“Dictionary” produces over fifty units, one for each hook withdictionary in the title.

By segmenting the web page into units, later instructions and extractorpatterns will only be matched within the units. The units can bedescribed using an extractor pattern. FIG. 30 shows the development ofan extractor pattern 3000 to match units from the results page of theExample Bookstore. The preview window 3002 shows a unit as renderedHTML.

FIG. 31 shows the inclusion of a dissect instruction 3100 in adescription of data of interest. FIG. 32 shows the results of thedissect instruction 3100 is the units 3200. Each of the units has asimilar structure and all subsequent instructions in the descriptionwill operate on each unit as a buffer.

5. Removing Information: Pruning

FIG. 33 shows the description of data of interest after adding thedissect instruction 3100. The next refinement will be to prune the unitsto ensure that all units have the title input in the extracted title.The pruning sub-step 3300 is added to the D-get instruction 3302. Apruning sub-step has a logical operator and one or more arguments. Inthis example, the logical operator for the pruning sub-step 3300 is the“contains” operator. The arguments for the pruning sub-step are theextracted titles and the input title. In this example, if the inputtitle is “Owen Meant”, then units where “Owen Meany” is not part of theextracted title are removed.

6. Branching and Looping

a. Extracting Everything

FIG. 34 shows a set of extraction parameters that produced more resultsthan the Example Bookstore web site will show at once. As indicated onthe web page at area 3400, only the first 50 of nearly 2500 results withthe search string are shown. The web page includes a link to retrievemore results. The additional data of interest can be retrieved bysetting up a loop, or a branch, inside the description of data ofinterest.

FIG. 35 shows a new description of data of interest that enables theretrieval of a first additional web page with data of interest. The newdescription has six instructions 3500-3510.

The first instruction is the post instruction 3500, this retrieves a webpage based on the title input by the user.

The second instruction is the skip instruction 3502 that is used tostore the buffer at sub-step 3512. Depending on whether a link toadditional information is detected, the sequence of instructions iscontrolled with the branch sub-steps 3516-3520.

The skip instruction 3502 has a sub-step 3512 that stores matchingportions of the web page for later use. The skip instruction 3502 alsohas three branch sub-steps 3516-3520. The branch sub-steps are executedin order. The first branch sub-step 3516 tests for the pattern“value=“More” and directs the control of the program to the third stepif the pattern is found. This will cause the post instruction 3504 to beexecuted next. The second branch sub-step 3518 tests for the pattern“Results” and directs control of the program to the fourth step if thepattern is found. This will cause the values instruction 3506 to beexecuted next. The final branch sub-step 3520 returns an error codeindicating that the site has changed. The use of this error code isdiscussed further in conjunction with FIG. 36.

The third step is post instruction 3504. This requests a page ofadditional matching entries and is only called if the first branchsub-step 3516 is taken.

The fourth step is the values instruction 3506. The values instructionloads the accumulated web page portions for further processing.

The fifth step is a D-get instruction 3508 to retrieve the sales ranksof all of the accumulated book information from all of the accumulatedweb pages.

The sixth step is the results instruction 3510 that extracts therequired information from the web site.

b. Detecting Errors and Problems

Branching can also be used to detect error conditions. One common errorcondition is that the extraction parameters produce no results, or theno matching results code. This is signaled by defining a pattern in abranch sub-step that is matched when no results are found.

FIG. 36 shows branch sub-steps 3602-3606 being defined for the postinstruction 3600. There is a first branch sub-step 3602, if the pattern“unable to find” appears in the result. The control continues atinstruction “−1” indicating a no matching products result. The branchsub-step 3604 tests the pattern-matches” to ensure that some resultswere found. The branch sub-step 3604 causes execution of the descriptionof data of interest to continue at the second instruction, thedissection instruction. Lastly, the branch sub-step 3606 is taken ifneither of the first two patterns is found, by continuing control atinstruction “−2” indicating a web site changed result.

When there is a web site changed result, the data query and extractionserver can send a message to the operator using e-mail, or generate alog entry. Both a no matching products result and a web site changedresult stop the execution of the description of data of interest and noextracted data will be returned to the client for the web site thatgenerated the error. The error can be reported to the client, but neednot be.

F. Alternative Embodiments

Some embodiments of the invention are included in an electromagneticwave form. The electromagnetic wave form comprises information such asthe GUI description creation program 114 and the programs on the dataquery and extraction computer 108 for using the descriptions of data ofinterest to extract data of interest from web sites. For example, theelectromagnetic wave form could include signals sent over a network froma server computer to a client computer.

G. Conclusion

Thus, a method and apparatus for defining data of interest has beendescribed. The method can be used to describe data of interest on anumber of web sites coupled to a network and retrieve matching data ofinterest from multiple sites.

The foregoing description of various embodiments of the invention havebeen presented for purposes of illustration and description. It is notintended to limit the invention to the precise forms disclosed. Manymodifications and equivalent arrangements will be apparent.

1. A method for extracting data from a data source, the methodcomprising: applying an extractor pattern to a data source; retrievingdata from the data source that corresponds to the extractor pattern; andstoring the data.
 2. The method of claim 1, further comprising creatingthe extractor pattern by selecting at least one set of predeterminedinstructions through a user interface.
 3. An apparatus for extractingdata from a data source, the apparatus comprising; at least oneprocessor; and at least one memory operatively coupled to the at leastone processor and storing instructions, that when executed by theprocessor, cause the processor to: apply an extractor pattern to a datasource; retrieve data from the data source that corresponds to theextractor pattern; and store the data.
 4. The apparatus of claim 3,wherein the extractor pattern is created by selecting at least one setof predetermined instructions through a user interface.